home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / fpl-v13.lha / fpl / src / reference.h < prev    next >
C/C++ Source or Header  |  1995-02-02  |  6KB  |  124 lines

  1. #ifndef FPL_REFERENCE_H
  2. #define FPL_REFERENCE_H
  3. /*
  4. **   $Filename: FPL/Reference.h $
  5. **   $Release: 9.0 $
  6. **   $Date: 1994/08/06 12:48:56 $
  7. **
  8. **   (C) Copyright 1992, 1993 by FrexxWare
  9. **       All Rights Reserved
  10. */
  11.  
  12. /************************************************************************
  13.  *                                                                      *
  14.  * fpl.library - A shared library interpreting script langauge.         *
  15.  * Copyright (C) 1992-1994 FrexxWare                                    *
  16.  * Author: Daniel Stenberg                                              *
  17.  *                                                                      *
  18.  * This program is free software; you may redistribute for non          *
  19.  * commercial purposes only. Commercial programs must have a written    *
  20.  * permission from the author to use FPL. FPL is *NOT* public domain!   *
  21.  * Any provided source code is only for reference and for assurance     *
  22.  * that users should be able to compile FPL on any operating system     *
  23.  * he/she wants to use it in!                                           *
  24.  *                                                                      *
  25.  * You may not change, resource, patch files or in any way reverse      *
  26.  * engineer anything in the FPL package.                                *
  27.  *                                                                      *
  28.  * This program is distributed in the hope that it will be useful,      *
  29.  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  30.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                 *
  31.  *                                                                      *
  32.  * Daniel Stenberg                                                      *
  33.  * Ankdammsgatan 36, 4tr                                                *
  34.  * S-171 43 Solna                                                       *
  35.  * Sweden                                                               *
  36.  *                                                                      *
  37.  * FidoNet 2:201/328    email:dast@sth.frontec.se                       *
  38.  *                                                                      *
  39.  ************************************************************************/
  40.  
  41. /*********                        *********
  42.  *********  INTRODUCED IN FPL 9:  *********
  43.  *********                        *********/
  44.  
  45. #define FPLREF_TYPE_STRING   (1<<0)  /* string   */
  46. #define FPLREF_TYPE_INTEGER  (1<<1)  /* integer  */
  47. #define FPLREF_TYPE_ARRAY    (1<<2)  /* array    (V10) */
  48. #define FPLREF_TYPE_FUNCTION (1<<3)  /* function (CNS) */
  49.  
  50. /*
  51.  * CNS = Currently Not Supported.
  52.  * Those things are expected to appear in a future version.
  53.  */
  54.  
  55. #define FR_OFFSET 200  /* ignore */
  56.  
  57. #define FPLREF_NAME (FR_OFFSET + 200) /* data is (char **) */
  58. /* Supply a pointer to a (char *) to this tag and you'll have the pointer
  59.    to the zero terminated string containing the name of the referenced
  60.    variable! */
  61.  
  62. #define FPLREF_TYPE (FR_OFFSET + 201) /* data is (long *) */
  63. /* Supply the address of a 'long', and FPL will store the type bits in
  64.    that address! The bits are defined as FPLREF_TYPE_XXXX below: */
  65.  
  66. #define FPLREF_GET_STRING (FR_OFFSET + 202) /* data is (char **) */
  67. /* Supply a pointer to a (char *) to this tag and you'll have the pointer
  68.    to the zero terminated string (in standard FPL format, use FPLSTRLEN()
  69.    macro to get real string length) */
  70.  
  71. #define FPLREF_SET_STRING (FR_OFFSET + 203) /* data is (char *) */
  72. /* Set the supplied string in the string variable referenced
  73.    THE STRING MUST HAVE BEEN ALLOCATED WITH fplAllocString() or FPL will
  74.    fail hard! */
  75.  
  76. #define FPLREF_GET_INTEGER (FR_OFFSET + 204) /* data is (long **) */
  77. /* Supply a pointer to a (long *) to this tag and you'll have the pointer
  78.    to the long word holding the contents of the integer variable, or NULL
  79.    if something is wrong! */
  80.  
  81. #define FPLREF_SET_INTEGER (FR_OFFSET + 205) /* data is (long) */
  82. /* Set the supplied number in the integer variable referenced */
  83.  
  84. /*********                         *********
  85.  *********  INTRODUCED IN FPL 10:  *********
  86.  *********                         *********/
  87.  
  88. #define FPLREF_ARRAY_ITEM (FR_OFFSET + 206) /* data is pointer to long array */
  89. /* Select which array item to read/write. Specify a pointer to an array
  90.    holding one long integers for each dimension specified ending with -1, like:
  91.    {dim1, dim2, -1} */
  92.  
  93. #define FPLREF_ARRAY_INFO (FR_OFFSET + 207)/* data: pointer to fplRef struct */
  94. /* Array variable reference information */
  95.  
  96. #define FPLREF_SET_MY_STRING (FR_OFFSET + 208) /* data is char pointer */
  97. /* To be used when the new string _isn't_ a FPL string. Supply a regular
  98.    char pointer and FPL will use that as the new string. This tag may be
  99.    combined with the FPLREG_SET_MY_STRLEN (which should be specified before
  100.    this tag) to set the actual string length. Without the length tag, FPL
  101.    will do a strlen() call to get the length of the string. */
  102.  
  103. #define FPLREF_SET_MY_STRLEN (FR_OFFSET + 209) /* data is long */
  104. /* Use this tag before the FPLREG_SET_MY_STRING tag, to make FPL use this
  105.    as string length instead of making a strlen() on the supplied char pointer
  106.    (which is slow and stops on ASCII zero). */
  107.  
  108. struct fplRef {
  109.   long Dimensions; /* number of array dimensions */
  110.   long *ArraySize; /* Array size array pointer */
  111. };
  112.  
  113. /*********                         *********
  114.  *********  INTRODUCED IN FPL 11:  *********
  115.  *********                         *********/
  116.  
  117. #define FPLREF_ARRAY_RESIZE (FR_OFFSET + 210) /* data is struct pointer */
  118. /* Fill in a fplRef struct with the new values of the array reference you
  119.    want to resize. You may very well alter the number of dimensions too.
  120.    Using more dimensions than 40 is considered illegal and may cause
  121.    unpredictable results. */
  122.  
  123. #endif /* FPL_REFERENCE_H */
  124.